<template>
  <div>
  </div>
</template>

<script>
export default {
  rules: {
    newPassword: [
      { 
        required: true, 
        message: '请输入新密码',
        trigger: ['blur']
      },
      {
        validator: (rule, value, callback) => {
          const regMobile = /(^(?=.*[a-zA-Z])(?=.*\d)(?=.*[!@#$%^&*(),.?":{}|<>]).{8,16}$)/
          return regMobile.test(value);
        },
        message: '请输入8-16位英文字母 + 数字 + 字符组合！',
        trigger: ['change','blur'],
      }
    ],
    confirmPassword: [
      { 
        required: true, 
        message: '请输入确认密码',
        trigger: ['blur']
      },
      {
        validator: (rule, value, callback) => {
          const regMobile = /(^(?=.*[a-zA-Z])(?=.*\d)(?=.*[!@#$%^&*(),.?":{}|<>]).{8,16}$)/
          return regMobile.test(value);
        },
        message: '请输入8-16位英文字母 + 数字 + 字符组合！',
        trigger: ['change','blur'],
      }
    ]
  }
}
</script>

<style lang="scss" scoped>
</style>

